<template>
 <div class="app-container" style="background-color:#FAFAFB">
<el-backtop :right="130"></el-backtop>

    <el-row type="flex" class="row-bg" justify="center" style="width:70%;margin:0 auto;">
      <el-col :span="24"><div class="grid-content bg-purple-light">
         <el-card class="box-card" shadow="never" style="margin:0px;border:0px;background-color:#FAFAFB;">
          <el-steps :active="currentStep" finish-status="finish">
          <el-step title="客户信息"></el-step>
          <el-step title="资产信息"></el-step>
          <!-- <el-step title="申请情况信息栏"></el-step> -->
          <!-- <el-step title="抵押物信息栏"></el-step> -->
          <el-step title="附件信息"></el-step>
          <el-step title="提交进件"></el-step>
        </el-steps>

    </el-card>
        </div></el-col>
    </el-row>
    <el-row type="flex" class="row-bg" justify="center">
      <el-col :span="24">
        <div class="grid-content bg-purple-light">
          <Customer v-on:stepChanged="stepChange($event)" :operation="operation" :submitProjectId="submitProjectId" :taskId="taskId" :isProjectSubmit="true" v-if="currentStep === 1"/>
          <Assets v-on:stepChanged="stepChange($event)" :operation="operation" :isProjectSubmit="true" v-if="currentStep === 2"/>
          <File v-on:stepChanged="stepChange($event)" :isProjectSubmit="true" v-if="currentStep === 3"/>
          <Detail v-on:stepChanged="stepChange($event)" :operation="operation" :taskId="taskId" :isProjectSubmit="true" v-if="currentStep === 4"/>
        </div>
        </el-col>
    </el-row>
  </div>
</template>


<script>
// import Table from '@/views/project/table';
import Customer from '@/views/credit/customer'
import Assets from '@/views/credit/assets'
import File from '@/views/credit/file'
import Detail from '@/views/credit/detail'

export default {
  name: 'add',
  components: {
     Customer,
     Assets,
     File,
     Detail
     },
  data() {
    return {
      currentStep: 1,
      name: "11",
      submitProjectId: undefined,
      taskId: undefined,
      operation: undefined,
    }
  },
  computed: {
  },
  created() {
      this.submitProjectId = this.$route.query.submitProjectId
      this.taskId = this.$route.query.taskId
      this.operation = this.$route.query.operation
  },
  methods: {
    stepChange(currentStep){
        this.currentStep = currentStep;
    }
  }
}
</script>
